﻿@model WeProjectsModel.News
@{
    List<WeProjectsModel.Tag> tags = ViewBag.Tags;
}
<style type="text/css">
    table tr td:first-child {
        width: 80px;
    }

    table td {
        padding-left: 10px;
        text-align: left !important;
    }
</style>

<h2>@Html.DisplayFor(model => model.Project.Title) > 新闻详细</h2>

@{
    ViewBag.Title = "Details";
    //int usrId = int.Parse(Membership.GetUser().ProviderUserKey.ToString());
    if (!ViewBag.IsVisible)
    {
        Response.Write("没有权限访问");
        Response.End();
    }
}
@*@Html.Partial("../project/_projectMenu2")*@

@if(Roles.IsUserInRole("sysadmin"))
{ 
    <p class="buttonIn">
    @Html.ActionLink("编辑","Edit",new {id=Model.ID},null)</p>
}
<h3 class="text-center" style="padding-top:10px;padding-bottom:7px;">@Html.DisplayFor(model => model.Title)</h3>
<p class="text-center">发布人：@Html.DisplayFor(model => model.Author.DisplayName)（@Html.Label(Model.PublishDate.Value.ToShortDateString())）</p>
<div class="text-center"><img src="@ViewBag.ImageData" alt="标题图片" /></div>
<div style="padding-top:10px;padding-bottom:10px;">
    @Html.Raw(Model.NewsContent)
</div>
@if (tags.Count > 0)
{
        <span>标签：</span>
            foreach (var c in tags)
            {
                <span style="padding-right:10px;">
                    @c.Name
                </span>
            }

}

